<template>
	<view class="uni_box home">
		<!-- <navbar backColor="#fff" backgroundColor="#fc772c">
		</navbar> -->
		<view class="content">
			<image class="img_qzz" :src="ossThree('/uploads/20250404/573dd121b664a0b0565b364c65a10f31.png')" />
			<image class="logintxt" mode="widthFix" src="/static/img/logintxt.png" />
			<text class="xuan">请选择您的身份</text>
			<view class="shenitem" @click="getswitach(1)">
				<image class="imgleft" src="/static/img/img_qzz.png" />
				<view class="shennav">
					<text class="shenname">我要找工作</text>
					<text class="shenmiao">岗位真实，报名即可确保名额</text>
				</view>
				<image class="xuanicon" mode="" src="/static/img/xuanicon.png" />
			</view>
			<view class="shenitem" @click="getswitach(2)">
				<image class="imgleft" src="/static/img/img_lb.png" />
				<view class="shennav">
					<text class="shenname">我要招人</text>
					<text class="shenmiao">员工接单，不放鸽子干活快</text>
				</view>
				<image class="xuanicon" mode="" src="/static/img/xuanicon.png" />
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				invite_code:''
			}
		},
		onLoad(option) {
			if(option.invite_code){
				this.invite_code = option.invite_code
				uni.setStorageSync('invite_code',this.invite_code);//2老板
				this.$store.commit('changeinvite_code',this.invite_code);
			}
		},
		onShow() {
			// console.log(this.$store.state.identity)
			if(this.$store.state.identity){
				uni.switchTab({ url: '/pages/tabbar/ClientHome',animationType:'slide-in-right' })
			}
		},
		methods: {
			getswitach(e){
				if(e == 1){
					uni.setStorageSync('identity',1);//1用户
					this.$store.commit('changeidentity',1);
					uni.switchTab({ url: '/pages/tabbar/ClientHome',animationType:'slide-in-right' })
				}else if(e == 2){
					uni.setStorageSync('identity',2);//2老板
					this.$store.commit('changeidentity',2);
					uni.switchTab({ url: '/pages/tabbar/ClientHome',animationType:'slide-in-right' })
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #fc772c;
	}
	.content{
		background-color: #fc772c;
		height: 100vh;
		display: flex;
		flex-direction: column;
		padding: 0 30rpx 170rpx;
		align-items: center;
		justify-content: center;
		// padding-bottom: 170rpx;
		.img_qzz{
			width: 200rpx;
			height: 200rpx;
			// margin-bottom: 40rpx;
			object-fit: cover;

		}
		.xuan{
			display: block;
			font-weight: 400;
			font-size: 32rpx;
			color: #EEEEEE;
			margin-bottom: 40rpx;
		}
		.logintxt{
			width: 317rpx;
			height: 37rpx;
			margin: 40rpx 0 30rpx;
		}
		.qname{
			font-weight: bold;
			font-size: 40rpx;
			color: #FFFFFF;
			display: block;
			margin-bottom: 70rpx;
		}
		.shenitem{
			display: flex;
			flex-direction: row;
			padding: 30rpx 30rpx;
			background-color: #fff;
			border-radius: 30rpx;
			width: 100%;
			align-items: center;
			margin-bottom: 30rpx;
			.imgleft{
				width: 140rpx;
				height: 140rpx;
				margin-right: 20rpx;
			}
			.shennav{
				display: flex;
				flex-direction: column;
				height: 100%;
				.shenname{
					font-weight: 800;
					font-size: 40rpx;
					color: #111111;
					display: block;
					margin-top: 14rpx;
				}
				.shenmiao{
					font-weight: 500;
					font-size: 26rpx;
					color: #111111;
					margin-top: auto;
					margin-bottom: 10rpx;
				}
			}
			.xuanicon{
				margin-left: auto;
				width: 24rpx;
				height: 24rpx;
			}
		}
		.qiebtn{
			width: 100%;
			height: 100rpx;
			background: #FFFFFF;
			border-radius: 30rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			font-weight: 800;
			font-size: 35rpx;
			color: #111111;
			margin-bottom: 40rpx;
		}
		.zanbu{
			background: rgba(255, 255, 255, 0.2);
			color: rgba(255, 255, 255, 1);
		}
	}
</style>
